package com.sd365.permission.centre.service;

import com.sd365.permission.centre.entity.*;
import com.sd365.permission.centre.pojo.dto.AdministrativeDTO;
import com.sd365.permission.centre.pojo.dto.CompanyDTO;
import com.sd365.permission.centre.pojo.query.AdministrativeQuery;
import com.sd365.permission.centre.pojo.query.IdVersionQuery;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

public interface AdministrativeService {

    /**
     * @param: 区域DTO
     * @return: 成功则true
     * @see
     * @since
     */
    @Transactional
    Boolean add(@RequestBody @Valid AdministrativeDTO administrativeDTO);


    /**
     * @param: id
     * @return: 成功则true
     * @see
     * @since
     */
    @Transactional
    Boolean remove(Long id,Long version);


    /**
     * @param: 区域DTO
     * @return: 成功则true
     * @see
     * @since
     */
    @Transactional
    Boolean modify(AdministrativeDTO administrativeDTO);


    @Transactional
    Boolean batchModify(AdministrativeDTO administrativeDTO);
    /**
     * @param: 区域搜索条件
     * @return: 区域列表
     * @see
     * @since
     */

    List<Administrative> commonQuery(AdministrativeQuery administrativeQuery);

    /**
     * @param: 区域id
     * @return:
     * @see
     * @since
     */
    AdministrativeDTO queryById(Long id);

    /**
     * 批量删除区域记录
     * @param idVersionQueryList
     * @return
     */
    @Transactional
    Boolean batchDelete(List<IdVersionQuery> idVersionQueryList);
}
